<div class="row justify-content-center">
    <div class="col-8">
        <div *ngIf="goods">
            <h2><span jhiTranslate="husenApp.goods.detail.title">Goods</span> {{goods.id}}</h2>
            <hr>
            <jhi-alert-error></jhi-alert-error>
            <dl class="row-md jh-entity-details">
                <dt><span jhiTranslate="husenApp.goods.name">Name</span></dt>
                <dd>
                    <span>{{goods.name}}</span>
                </dd>
                <dt [hidden]="true"><span jhiTranslate="husenApp.goods.appid">Appid</span></dt>
                <dd [hidden]="true">
                    <span>{{goods.appid}}</span>
                </dd>
                <dt [hidden]="true"><span jhiTranslate="husenApp.goods.openid">Openid</span></dt>
                <dd [hidden]="true">
                    <span>{{goods.openid}}</span>
                </dd>
                <dt [hidden]="true"><span jhiTranslate="husenApp.goods.pic">Pic</span></dt>
                <dd [hidden]="true">
                    <span>{{goods.pic}}</span>
                </dd>
                <dt><span jhiTranslate="husenApp.goods.picImg">Pic Img</span></dt>
                <dd>
                    <div *ngIf="goods.picImg">
                        <a (click)="openFile(goods.picImgContentType, goods.picImg)">
                            <img [src]="'data:' + goods.picImgContentType + ';base64,' + goods.picImg" style="max-width: 100%;" alt="goods image"/>
                        </a>
                        {{goods.picImgContentType}}, {{byteSize(goods.picImg)}}
                    </div>
                </dd>
                <dt><span jhiTranslate="husenApp.goods.miniPrice">Mini Price</span></dt>
                <dd>
                    <span>{{goods.miniPrice}}</span>
                </dd>
                <dt><span jhiTranslate="husenApp.goods.orders">Orders</span></dt>
                <dd>
                    <span>{{goods.orders}}</span>
                </dd>
                <dt><span jhiTranslate="husenApp.goods.status">Status</span></dt>
                <dd>
                    <span jhiTranslate="{{'husenApp.GoodsStatus.' + goods.status}}">{{goods.status}}</span>
                </dd>
                <dt><span jhiTranslate="husenApp.goods.shop">Shop</span></dt>
                <dd>
                    <div *ngIf="goods.shopId">
                        <a [routerLink]="['/shop', goods.shopId, 'view']">{{goods.shopId}}</a>
                    </div>
                </dd>
            </dl>

            <button type="submit"
                    (click)="previousState()"
                    class="btn btn-info">
                <fa-icon [icon]="'arrow-left'"></fa-icon>&nbsp;<span jhiTranslate="entity.action.back"> Back</span>
            </button>

            <button type="button"
                    [routerLink]="['/goods', goods.id, 'edit']"
                    class="btn btn-primary">
                <fa-icon [icon]="'pencil-alt'"></fa-icon>&nbsp;<span jhiTranslate="entity.action.edit"> Edit</span>
            </button>
        </div>
    </div>
</div>
